<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Demo.Models.Post>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
	<title>Index</title>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h1>Posts</h1>
    
    <%= Html.ActionLink("New Post", "New") %>
    
    <% foreach (var item in Model) {%>
		<div>
			<h2><%= Html.ActionLink(item.Title, "Show", new { id = item.Id }) %></h2>
			<p>
				<%= item.Content %>
			</p>
		</div>
    <% }%>

</asp:Content>
